<HTML>
<HEAD>
<TITLE>Add </TITLE>
<script type="text/javascript">
function initXMLHttpClient() 
{
     var xmlhttp;
     try {
         // Mozilla / Safari / IE7
         xmlhttp = new XMLHttpRequest();
     } 
     catch (e) 
     {
          // IE
          var XMLHTTP_IDS = new Array('MSXML2.XMLHTTP.5.0',
                                     'MSXML2.XMLHTTP.4.0',
                                     'MSXML2.XMLHTTP.3.0',
                                     'MSXML2.XMLHTTP',
                                     'Microsoft.XMLHTTP' );
        var success = false;
          for (var i=0;i < XMLHTTP_IDS.length && !success; i++) 
	  {
              try 
	    	{
                   xmlhttp = new ActiveXObject(XMLHTTP_IDS[i]);
                      success = true;
                } catch (e) {}
          }
          if (!success) 
	  {
              throw new Error('Unable to create XMLHttpRequest.');
          }
      }
     return xmlhttp;
}


function displaySelection()
{
	var lSelectBox;
	var httpGetReq = initXMLHttpClient();
	//alert("CALLED");
   	httpGetReq.onreadystatechange =function() 
	{
   		if(httpGetReq.readyState == 4)
   		{
        		if (httpGetReq.status==200)
        		{
          		//alert(httpGetReq.responseText);
				document.getElementById('show_window').innerHTML = httpGetReq.responseText;
			}
		}
	}
	
	lSelectBox =  document.getElementById("selectbox");
	//alert(lSelectBox.selectedIndex);
	httpGetReq.open("GET","/modules/administration/getWindow.jsp?category=" + lSelectBox.options[lSelectBox.selectedIndex].value,true);
	
    httpGetReq.send(null);
}
</script>

<BODY>
<BR></BR>
<TABLE align="center">
<TR>
	<TD> What do you want to create ?    
	<select id="selectbox" onChange="displaySelection()">
		<optgroup label="Country">
		<option value="state">State</option>
		</optgroup>
		<optgroup label="Vertical">
		<option value="department">Department</option>
		<option value="subdepartment">Sub Department</option>
		</optgroup>
	   </select>  
	</TD>
	<TD>
	</TD>
	
</TR>
</TABLE>
<BR><BR>
<div align="center" id="show_window"></div>
</form>
</BODY>
</HTML>

